If the Flow itself throws an exception -- directly or indirectly -- that exception is then thrown from your FlowCollector (i.e., your collect() lambda expression). You can wrap your collect() call in a try/catch block to handle the exception

You can learn more about this in:
Tags:
Run Edit